package com.goldmantis.alitrip.common.sysenum;

/**
 * @Author:Shmily
 * @Description:
 * @Date:Create in 12:55 2018/2/24
 */
public enum EnumButtonType {

    view(1,"查看"),
    add(2,"新增"),
    edit(3,"编辑"),
    delete(4,"删除"),
    print(5,"打印"),
    audit(6,"审核"),
    cancel(7,"取消"),
    end(8,"结束"),
    extend(9,"扩展");

    EnumButtonType(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    private Integer value;

    private String text;

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static String getTextByValue(Integer value){
        for(EnumButtonType responseEnum : EnumButtonType.values()) {
            if(responseEnum.getValue().intValue()==value.intValue()){
                return responseEnum.getText();
            }
        }
        return null;
    }
}
